FROM node:16


EXPOSE 3000

WORKDIR /app

RUN git clone https://github.com/seanaharrison/node-express-mongodb-example.git . && \ 
    npm install

#CMD sleep 5 && sed -i 's/127.0.0.1:27017\/myMongoDB/\$MONGO_URL:$MONGO_PORT\/\$MONGO_DATABASE/g' ./app.js && more ./app.js &&  npm run start
CMD sleep 60 && sed -i 's/127.0.0.1:27017\/myMongoDB/mongo:27017\/thomas/g' ./app.js && more ./app.js &&  npm run start